﻿using System;
using System.IO;

namespace LabSolutions
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = null;
            using (StreamReader sr = new StreamReader("input.txt"))
            {
                input = sr.ReadToEnd();
            }            
            double a = double.Parse(input);
            double z1 = (Math.Sin(4 * a) / (1 + Math.Cos(4 * a))) * (Math.Cos(2 * a) / (1 + Math.Cos(2 * a)));
            double z2 = 1 / Math.Tan(3d / 2d * Math.PI - a);
            using (StreamWriter sw = new StreamWriter("output.txt"))
            {
                sw.WriteLine(z1.ToString("0.00000"));
                sw.Write(z2.ToString("0.00000"));
            }            
        }
    }
}
